home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Cafe 3
/
Visual Cafe 3.ISO
/
Vcafe
/
JFC.bin
/
TreeNode.java
< prev
next >
Wrap
Text File
|
1998-06-30
|
2KB
|
72 lines
/*
* @(#)TreeNode.java 1.10 97/09/23
*
* Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the confidential and proprietary information of Sun
* Microsystems, Inc. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Sun.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
* SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
* SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
* THIS SOFTWARE OR ITS DERIVATIVES.
*
*/
package com.sun.java.swing.tree;
import java.util.Enumeration;
/**
* @version 1.10 09/23/97
* @author Rob Davis
* @author Scott Violet
*/
public interface TreeNode
{
/**
* Returns the child <code>TreeNode</code> at index
* <code>childIndex</code>.
*/
TreeNode getChildAt(int childIndex);
/**
* Returns the number of children <code>TreeNode</code>s the receiver
* contains.
*/
int getChildCount();
/**
* Returns the parent <code>TreeNode</code> of the receiver.
*/
TreeNode getParent();
/**
* Returns the index of <code>node</code> in the receivers children.
* If the receiver does not contain <code>node</code>, -1 will be
* returned.
*/
int getIndex(TreeNode node);
/**
* Returns true if the receiver allows children.
*/
boolean getAllowsChildren();
/**
* Returns true if the receiver is a leaf.
*/
boolean isLeaf();
/**
* Returns the children of the reciever as an Enumeration.
*/
Enumeration children();
}